<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>用户基本信息</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="stylesheet" href="/Woniu/Public/X-admin/css/x-admin.css" media="all">
    </head>
    <body>
        <div class="x-nav">
            <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon" style="line-height:29px">ဂ</i> <i class="layui-icon" style="line-height:30px">刷新</i></a>
        </div>
      	<xblock style="height:40px" >
        <form style="float:right;" class="layui-form" action="/Woniu/index.php/Home/Leave/classManage" method="get">
	        <div class="layui-input-inline" style="width:180px">
		        <select name="class" width="50px" >
					   <option value="">按班级查找</option>
              <?php if(is_array($classs)): foreach($classs as $key=>$rows): ?><option value="<?php echo ($rows['id']); ?>" ><?php echo ($rows['name']); ?></option><?php endforeach; endif; ?>
			  	  </select>
		  	  </div>
		  	  <button class="layui-btn" type="submit" lay-filter="formDemo"><i class="layui-icon" style="font-size: 20px;" >&#xe615;</i>搜索</button>
        	</form>
        </xblock>

        <div class="layui-tab">
			<div class="layui-tab-content">
				<div class="layui-tab-item layui-show">
        
					<table class="layui-table">
					  <colgroup>
					    <col width="20%">
					    <col width="20%">
					    <col width="20%">
					    <col width="20%">
					    <col>
					  </colgroup>
					  <thead>
					    <tr>
					      <th>班级</th>
					      <th>班主任</th>
					      <th>项目经理</th>
					      <th>班级状态</th>
					      <th>操作</th>
					    </tr> 
					  </thead>
					  <tbody>
		            <form class="layui-form" action="" method="post">
		              <?php if(is_array($list)): foreach($list as $key=>$row): ?><tr>
      					      <td><?php echo ($row['name']); ?></td>
      					      <td><?php echo ($row['admin_id']); ?></td>
      					      <td><?php echo ($row['pm_id']); ?></td>
      					      <td><?php echo ($row['status']); ?></td>
      					      <td class="td-manage">
      		              <a title="导出数据" href="/Woniu/index.php/Home/Obtain/download/classid/<?php echo ($row['id']); ?>" class="ml-5" style="text-decoration:none"><i style="font-size: 30px; color: #1E9FFF;" class="layui-icon">&#xe601;</i></a>

                        <a title="清除班级就业信息" href="javascript:;" onclick="admin_del(this,<?php echo ($row['id']); ?>)" style="text-decoration:none"><i style="font-size: 30px; color: #FF5722;" class="layui-icon">&#xe640;</i></a>
      		                   
      		            </td>
      					    </tr><?php endforeach; endif; ?>
		            </tbody>
		          </table>
					</form>
					<div class="total">共<?php echo ($total); ?>条数据</div>
			      
			        <div id="pages"></div>
				</div>
			</div>
		</div>
	
        <script src="/Woniu/Public/X-admin/lib/layui/layui.js" charset="utf-8"></script>
        <script src="/Woniu/Public/X-admin/js/x-layui.js" charset="utf-8"></script>
        

        <script>

             layui.use(['laydate','element','laypage','layer','form'], function(){
                $ = layui.jquery;//jquery
              laydate = layui.laydate;//日期插件
              lement = layui.element();//面包导航
              laypage = layui.laypage;//分页
              layer = layui.layer;//弹出层
              form = layui.form();     

              //以上模块根据需要引入
              //调用分页
              laypage({
                cont: 'pages',
                curr: <?php echo ($curr); ?>,
                groups: 5,
                pages: <?php echo ($page); ?>, //得到总页数
                skip: true,
                jump: function(obj, first){
                  var url = window.location.href;
                  if (url.indexOf('?') < 0) {
                      url = window.location.href;
                  }else{
                      url=url.substr(0, url.indexOf('?'));
                  }
                  search="<?php echo ($search); ?>";
                  if (!first) {
                    window.location.href=url+search+"/p/"+obj.curr+".html";
                  }
                }
              }); 
              
            });
             /*添加*/
            function admin_add(title,url,w,h){
                x_admin_show(title,url,w,h);
            }
            //编辑
            function admin_edit (title,url,id,w,h) {
                x_admin_show(title,url,w,h); 
            }
            /*删除*/
            function admin_del(obj,id){
                layer.confirm('确认要清除此班级就业信息吗？',function(index){
                    //发异步删除数据  
                    $.post("/Woniu/index.php/Home/Obtain/delete",{classid:id},function(data){
                      if(data=="失败"){
                          alert('清除失败');
                      }
                    });
                });
            }
            </script>
            <script>
                function reload(){
                  location.replace(location.href);
                }
            </script>
    </body>
</html>